package javabase.biji;


/**
 * @Auther: luzhanshi
 * @Date: 2021/1/29 - 01 - 29 - 10:52 
 * @Description: javabase.biji
 * @version: 1.0
 */
public class _16String {

    public static void main(String[] args) {
        String string = new String();

        String s1 = "abc";
        String s2 = "abc";
        System.out.println(s1==s2);
        s1="def";
        System.out.println(s1==s2);

        String s3=new String((new char[]{'a', 'b', 'c'}));
        System.out.println(s3==s2);
        System.out.println(s3.endsWith(s2));


        StringBuilder append = new StringBuilder().append("11").append(22).append(true);
        System.out.println(append);


        StringBuilder builder = new StringBuilder().append("a").append("b").append("c").append("d");
        String s = builder.toString();
        String ss="abcd";
        System.out.println(s==ss);//false
        System.out.println(s.endsWith(ss));//true

    }


}
